<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template linear_congruential_engine</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../boost_random/reference.html#doxygen.headers.linear__congruential_8hpp" title="Header &lt;boost/random/linear_congruential.hpp&gt;">
<link rel="prev" href="classboost_1_1random_1_1laplace__distribution_1_1param__type.html" title="Class param_type">
<link rel="next" href="classboost_1_1random_1_1rand48.html" title="Class rand48">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1random_1_1laplace__distribution_1_1param__type.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_random/reference.html#doxygen.headers.linear__congruential_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1random_1_1rand48.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template linear_congruential_engine</span></h2>
<p>boost::random::linear_congruential_engine</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_random/reference.html#doxygen.headers.linear__congruential_8hpp" title="Header &lt;boost/random/linear_congruential.hpp&gt;">boost/random/linear_congruential.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> IntType<span class="special">,</span> <span class="identifier">IntType</span> a<span class="special">,</span> <span class="identifier">IntType</span> c<span class="special">,</span> <span class="identifier">IntType</span> m<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">IntType</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a01eafe03ce5166f43ae56d347e8d4286"></a><span class="identifier">result_type</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#id-1_3_32_5_6_25_1_1_1_9-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a7ba1c7ea6051b711530e252d16ece7df"><span class="identifier">linear_congruential_engine</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1ae4bbd4fef372bbde81b9b3bd7e0d5266"><span class="identifier">linear_congruential_engine</span></a><span class="special">(</span><span class="identifier">IntType</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeedSeq<span class="special">&gt;</span> <span class="keyword">explicit</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a8e30bcb76d3ce33194267e88a4aaeaa5"><span class="identifier">linear_congruential_engine</span></a><span class="special">(</span><span class="identifier">SeedSeq</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1ac5eabebdfd0eb356820b7592037a9c1a"><span class="identifier">linear_congruential_engine</span></a><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">It</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1ad93f7a599811bd7a453edabe9673769e"><span class="identifier">seed</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1aecf65e4c191295119bacfdf9c40b2169"><span class="identifier">seed</span></a><span class="special">(</span><span class="identifier">IntType</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeedSeq<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a78c0a48ec8f717c987281d9c2731fafc"><span class="identifier">seed</span></a><span class="special">(</span><span class="identifier">SeedSeq</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a0d3fb46455d7d44e3535655752207dc4"><span class="identifier">seed</span></a><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">It</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">IntType</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a966d0d6a8789db29983e98034c6c0282"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Iter<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1ab0fedc415e34e2fb7985dd8c34733006"><span class="identifier">generate</span></a><span class="special">(</span><span class="identifier">Iter</span><span class="special">,</span> <span class="identifier">Iter</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1afe8a858b2d608f6872efcb14d5dd4d5c"><span class="identifier">discard</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uintmax_t</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#id-1_3_32_5_6_25_1_1_1_10-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="identifier">result_type</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a8e2287fc30588ee4d51fdc2258c49a4a"><span class="identifier">min</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">result_type</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a88d9f2dd0ef26f5b36cd9ef09b68471a"><span class="identifier">max</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#id-1_3_32_5_6_25_1_1_1_11-bb">friend functions</a></span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
    <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a8187965ca589574f8ca657b41df52faf"><span class="keyword">operator</span><span class="special">&lt;&lt;</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">,</span> 
               <span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
    <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html#doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a8f45b74cfb994a8ca359f02175aa451b"><span class="keyword">operator</span><span class="special">&gt;&gt;</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">,</span> 
               <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// public data members</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">has_fixed_range</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">IntType</span> <span class="identifier">multiplier</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">IntType</span> <span class="identifier">increment</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">IntType</span> <span class="identifier">modulus</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">IntType</span> <span class="identifier">default_seed</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.32.5.6.24.3.4"></a><h2>Description</h2>
<p>Instantiations of class template <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a> model a  <a class="link" href="../../boost_random/reference.html#boost_random.reference.concepts.pseudo_random_number_generator" title="Pseudo-Random Number Generator">pseudo-random number generator</a> . Linear congruential pseudo-random number generators are described in:</p>
<p> </p>
<div class="blockquote"><blockquote class="blockquote"><p>  "Mathematical methods in large-scale computing units", D. H. Lehmer, Proc. 2nd Symposium on Large-Scale Digital Calculating Machines, Harvard University Press, 1951, pp. 141-146  </p></blockquote></div>
<p> </p>
<p>Let x(n) denote the sequence of numbers returned by some pseudo-random number generator. Then for the linear congruential generator, x(n+1) := (a * x(n) + c) mod m. Parameters for the generator are x(0), a, c, m. The template parameter IntType shall denote an integral type. It must be large enough to hold values a, c, and m. The template parameters a and c must be smaller than m.</p>
<p>Note: The quality of the generator crucially depends on the choice of the parameters. User code should use one of the sensibly parameterized generators such as minstd_rand instead. </p>
<div class="refsect2">
<a name="id-1.3.32.5.6.24.3.4.6"></a><h3>
<a name="id-1_3_32_5_6_25_1_1_1_9-bb"></a><code class="computeroutput">linear_congruential_engine</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a7ba1c7ea6051b711530e252d16ece7df"></a><span class="identifier">linear_congruential_engine</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Constructs a <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code>, using the default seed </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1ae4bbd4fef372bbde81b9b3bd7e0d5266"></a><span class="identifier">linear_congruential_engine</span><span class="special">(</span><span class="identifier">IntType</span> x0<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs a <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code>, seeding it with <code class="computeroutput">x0</code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeedSeq<span class="special">&gt;</span> <span class="keyword">explicit</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a8e30bcb76d3ce33194267e88a4aaeaa5"></a><span class="identifier">linear_congruential_engine</span><span class="special">(</span><span class="identifier">SeedSeq</span> <span class="special">&amp;</span> seq<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs a <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code>, seeding it with values produced by a call to <code class="computeroutput">seq.generate()</code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1ac5eabebdfd0eb356820b7592037a9c1a"></a><span class="identifier">linear_congruential_engine</span><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span> first<span class="special">,</span> <span class="identifier">It</span> last<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs a <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code> and seeds it with values taken from the itrator range [first, last) and adjusts first to point to the element after the last one used. If there are not enough elements, throws <code class="computeroutput">std::invalid_argument</code>.</p>
<p>first and last must be input iterators. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1ad93f7a599811bd7a453edabe9673769e"></a><span class="identifier">seed</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Calls seed(default_seed) </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1aecf65e4c191295119bacfdf9c40b2169"></a><span class="identifier">seed</span><span class="special">(</span><span class="identifier">IntType</span> x0_<span class="special">)</span><span class="special">;</span></pre>
<p>If c mod m is zero and x0 mod m is zero, changes the current value of the generator to 1. Otherwise, changes it to x0 mod m. If c is zero, distinct seeds in the range [1,m) will leave the generator in distinct states. If c is not zero, the range is [0,m). </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeedSeq<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a78c0a48ec8f717c987281d9c2731fafc"></a><span class="identifier">seed</span><span class="special">(</span><span class="identifier">SeedSeq</span> <span class="special">&amp;</span> seq<span class="special">)</span><span class="special">;</span></pre>
<p>Seeds a <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code> using values from a SeedSeq. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a0d3fb46455d7d44e3535655752207dc4"></a><span class="identifier">seed</span><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span> first<span class="special">,</span> <span class="identifier">It</span> last<span class="special">)</span><span class="special">;</span></pre>
<p>seeds a <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code> with values taken from the itrator range [first, last) and adjusts <code class="computeroutput">first</code> to point to the element after the last one used. If there are not enough elements, throws <code class="computeroutput">std::invalid_argument</code>.</p>
<p><code class="computeroutput">first</code> and <code class="computeroutput">last</code> must be input iterators. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">IntType</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a966d0d6a8789db29983e98034c6c0282"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Returns the next value of the <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Iter<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1ab0fedc415e34e2fb7985dd8c34733006"></a><span class="identifier">generate</span><span class="special">(</span><span class="identifier">Iter</span> first<span class="special">,</span> <span class="identifier">Iter</span> last<span class="special">)</span><span class="special">;</span></pre>
<p>Fills a range with random values </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1afe8a858b2d608f6872efcb14d5dd4d5c"></a><span class="identifier">discard</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uintmax_t</span> z<span class="special">)</span><span class="special">;</span></pre>
<p>Advances the state of the generator by <code class="computeroutput">z</code>. </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.32.5.6.24.3.4.7"></a><h3>
<a name="id-1_3_32_5_6_25_1_1_1_10-bb"></a><code class="computeroutput">linear_congruential_engine</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">result_type</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a8e2287fc30588ee4d51fdc2258c49a4a"></a><span class="identifier">min</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Returns the smallest value that the <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code> can produce. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">result_type</span> <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a88d9f2dd0ef26f5b36cd9ef09b68471a"></a><span class="identifier">max</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Returns the largest value that the <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code> can produce. </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.32.5.6.24.3.4.8"></a><h3>
<a name="id-1_3_32_5_6_25_1_1_1_11-bb"></a><code class="computeroutput">linear_congruential_engine</code> friend functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
  <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a8187965ca589574f8ca657b41df52faf"></a><span class="keyword">operator</span><span class="special">&lt;&lt;</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> os<span class="special">,</span> 
             <span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a> <span class="special">&amp;</span> lcg<span class="special">)</span><span class="special">;</span></pre>
<p>Writes a <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code> to a <code class="computeroutput">std::ostream</code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
  <a name="doxygen.headers.classboost_1_1random_1_1linear__congruential__engine_1a8f45b74cfb994a8ca359f02175aa451b"></a><span class="keyword">operator</span><span class="special">&gt;&gt;</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> is<span class="special">,</span> 
             <a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a> <span class="special">&amp;</span> lcg<span class="special">)</span><span class="special">;</span></pre>
<p>Reads a <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1linear__congruential__engine.html" title="Class template linear_congruential_engine">linear_congruential_engine</a></code> from a <code class="computeroutput">std::istream</code>. </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2000-2005 Jens Maurer<br>Copyright © 2009, 2010 Steven Watanabe<br>Copyright © 2022-2025 Matt
      Borland<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1random_1_1laplace__distribution_1_1param__type.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_random/reference.html#doxygen.headers.linear__congruential_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1random_1_1rand48.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
